package cn.jbit.stream.pojo;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.annotation.JSONField;
import com.google.gson.annotations.Expose;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @author 张在成
 */
@Data
public class User implements Serializable,Cloneable {

    private  int  id;

    @JSONField(serialize = false)
    private  String   name;
    @Expose(serialize = false)
    private  String  password;
    private Date date;

    @Override
    public Object clone() throws CloneNotSupportedException {
        return JSON.parseObject(JSONArray.toJSONString(this),User.class);
    }
}
